import fileinput

# with fileinput.input(files="example.txt") as f:               # 1.不修改源文件
with fileinput.input(files="example.txt", inplace=True) as f:   # 2.修改源文件
    for line in f:
        print(line.replace("11", "111"), end="")
